﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NetDon.OA.Interface
{
    using Utilities;

    public enum LogLevel
    {
        [EnumDescription("错误")]
        Error = 0,
        //[EnumDescription("警告")]
        //Warning = 1,
        //[EnumDescription("提示信息")]
        //Information = 2,
        [EnumDescription("审计成功")]
        SuccessAudit = 3,
        [EnumDescription("审计失败")]
        FailureAudit = 4,
        [EnumDescription("登出信息")]
        Logout = 5,
        [EnumDescription("流程申请与审核")]
        Workflow = 6
    }
    [Serializable]
    public class LoggingEvent
    {
        /// <summary>
        /// Gets or sets the application id.
        /// </summary>
        /// <value>The application id.</value>
        public Guid ApplicationId { get; set; }
        /// <summary>
        /// Gets or sets the log event message.
        /// </summary>
        public string Message { get; set; }

        /// <summary>
        /// Gets or sets the category of log event.
        /// </summary>
        public string Category { get; set; }

        /// <summary>
        /// Gets or sets the user name.
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// Gets or sets the source of log event.
        /// </summary>
        public string Source { get; set; }

        /// <summary>
        /// Gets or sets the level of log event.
        /// </summary>
        public LogLevel Level { get; set; }
    }

    public interface ILogService
    {
        void Log(LoggingEvent logEvent);
    }
}